{extend name="base" /}
{block name="content"}
<script src="__STATIC__/public/My97DatePicker/WdatePicker.js"></script>
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}">
                <i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>商城</span>
            <span class="icon-angle-right"></span>
            <span>直播管理</span>
            <span class="icon-angle-right"></span>
            <span>直播间列表</span>
            <a class="u-flush">
                <i class="icon-repeat"></i>
            </a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <table class="m-table">
                <tr>
                    <th>
                        <div class="m-options cf">
                            <div class="m-opts fl"><a href="{:url('add')}" class="u-btn"><i class="icon-plus"></i>添加活动</a></div>
                        </div>
                    </th>
                </tr>
            </table>
            <form class="layui-form m-list-form">
                <table class="m-table">
                    <tbody class="datas">
                    <tr>
                        <th width="5%">ID</th>
                        <th width="10%">直播间名称</th>
                        <th width="10%">活动图片</th>
                        <th width="10%">状态</th>
                        <th width="10%">操作</th>
                    </tr>
                    {foreach name="data" item="v"}
                    <tr>
                        <td>{$v.id}</td>
                        <td>{$v.title}</td>
                        <td><img src="{$v.image_uri}" alt="" style="display: block; width: 50px; height: 50px;" /></td>
                        <td><input type="checkbox" name="status" data-id="{$v.id}" lay-skin="switch" lay-filter="switch" lay-text="启用|禁用"{$v.status ? ' checked' : ''} /></td>
                        <td class="m-opt">
                            <a href="{:url('addgoods', ['id' => $v.id])}" title="查看">直播商品</a>
                            <a href="{:url('add', ['id' => $v.id])}" title="查看"><i class="icon-pencil"></i></a>
                            <a href="javascript:;" title="删除" class="u-del" data-id="{$v.id}"><i class="icon-trash"></i></a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
            </form>
            {include file="public:page" /}
        </div>
    </div>
</div>
{/block}{block name="extrajs"}
{include file="laypage" /}
{/block}
